package com.sz.stock.utils;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

//生成合同编号的方法
@Component
public class  ContUtils{
    // 格式化的时间字符串
    private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
    // 获取当前时间年月日时分秒毫秒字符串
    public  String getcontractid() {
        return "N"+sdf.format(new Date());
    }
}